<!DOCTYPE html>
<html lang="en">

<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>Document</title>
</head>

<body>
	<script>
		function Parent() {
			this.info = {
				name: "yhd",
				age: 19,
			}
		}

		function Child() {
			Parent.call(this)
		}

		let child1 = new Child();
		child1.info.gender = "男";
		console.log(child1.info); // {name: "yhd", age: 19, gender: "男"};

		let child2 = new Child();
		console.log(child2.info); // {name: "yhd", age: 19}
	</script>
</body>

</html>